#include <bits/stdc++.h>
#define int long long
using namespace std;
int n;
struct node
{
    int r;
    bool die;
} a[100002];;
int tail;
int sum;
bool cmp(node x,node y)
{
    return x.r>y.r;
}
signed main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie();
    cin>>n;
    for(int i=1; i<=n; i++)
        cin>>a[i].r;
    sort(a+1,a+1+n,cmp);
    if(a[1].r==a[n].r)
    {
        cout<<n;
        return 0;
    }
    for(int i=1; i<=n; i++)
    {
        int pos=2;
        while(a[pos].r==a[i].r || a[pos].die)
        {
            pos++;
            if(pos==n+1)
                break;
        }
        if(pos!=n+1)
        {
            sum++;
            a[i].die=true;
            a[pos].die=true;
        }
        else
            break;
    }
    cout<<n-sum;
    return 0;
}
